using System.Text.Json.Serialization;

namespace Sage.CloudStorage.Qiniu.Models
{
    /// <summary>
    /// CDN预取结果
    /// </summary>
    public class CdnPrefetchResult
    {
        /// <summary>
        /// 状态码
        /// </summary>
        [JsonPropertyName("code")]
        public int Code { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        [JsonPropertyName("error")]
        public string? Error { get; set; }

        /// <summary>
        /// 请求ID(可用于反馈排查)
        /// </summary>
        [JsonPropertyName("requestId")]
        public string? RequestId { get; set; }

        /// <summary>
        /// 非法URL
        /// </summary>
        [JsonPropertyName("invalidUrls")]
        public List<string>? InvalidUrls { get; set; }

        /// <summary>
        /// 当日预取限额
        /// </summary>
        [JsonPropertyName("quotaDay")]
        public int QuotaDay { get; set; }

        /// <summary>
        /// 当日剩余预取额度
        /// </summary>
        [JsonPropertyName("surplusDay")]
        public int SurplusDay { get; set; }
    }
}